﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class VariableStatementElement : StatementElement
    {
        private VariableExpressionElement variable;

        public VariableExpressionElement Variable { get { return variable; } set { variable = value; } }

        public VariableStatementElement(TokenInfo StartInfo, VariableExpressionElement Variable, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            variable = Variable;
        }

        public override string ToString()
        {
            return variable.ToString();
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return variable;
        }
    }
}
